<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	import="java.util.*,com.beans.*;" pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Insert title here</title>
<script type="text/javascript">

	function testClick() {
		var div = document.getElementById("sendmessage");
		div.style.width = "100px";
		div.style.height = "100px";
		div.style.color = "Black";
		if (div.style.display == "inline") {
			div.style.display = "none";
		} else {
			div.style.display = "inline";
		}

	}

	function showalert() {
		alert("Message Sent Successfully");
	}
</script>
</head>
<body>


	<div style="border: 5px solid #37B1CC; min-height: 400px;margin: 5px 0px 0px 5px;">
		<div align="center">
			<img src="image/birthdays.jpg">
		</div>


		<%!ArrayList<BirthdayForm> tlist = null;%>
		<%
			tlist = (ArrayList<BirthdayForm>) request
					.getAttribute("currentBirthdayList");

			if (!tlist.isEmpty()) {
		%>
		<div style="border: 3px solid #37B1CC;">
			<div
				style="font-style: oblique; font-size: 25px; border: 2px solid white;background-color: #37B1CC;color:white; font-weight: 900;">
				&nbsp;&nbsp;Today Birthdays
			</div>
			

			<%
				for (BirthdayForm birthdayForm : tlist) {
						String userName = birthdayForm.getUserName();
			%>
			<div style="min-height: 45px;border: 1px solid #37B1CC;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<span><img src="image/15.jpg" height="60px" width="90px" style="vertical-align: middle;;"></span>
			<span style="font-weight: bold; font-size: 17px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%=userName%>&nbsp;&nbsp;</span>
			<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
				
				<% String current_user=session.getAttribute("name").toString();
				   System.out.println(current_user+"......."+userName);
				%>
				
				
				<% if(!current_user.equals(userName)){ %>
				<button id="wish" onclick="testClick()" style="font-size: 17px;color:#C7F2F2 ;background-color: #2CBBD1;font-family:cursive;"  >Make A Wish</button>
				<%} %>
			</span></div>
			
			<div id="sendmessage" style="display: none;max-height: 25px;vertical-align: middle;">
				<form action="" style="max-height: 25px;text-align: center;vertical-align: middle;padding-top: -50px">
					<label style="font-size: 17px;text-align: center;">Enter
						your message</label> <input type="text" id="message" maxlength="100"> <input
						id="sendbtn" type="submit" value="Send Message"
						onclick="showalert()">
				</form>
			</div>
			<%
				}
			%>
		</div>

		<%
			}
		%>

		<div
			style="font-style: oblique;border: 3px solid white; font-size: 20px; color: white; background-color:#37B1CC;font-weight: 900;height: 25px;vertical-align: middle;">
			&nbsp;&nbsp;&nbsp;<u>Upcoming Birthdays</u>
		</div>

		<div style="clear: both; border: 1px solid #37B1CC; min-height: 85px">
			<%!ArrayList<BirthdayForm> mlist = null;%>
			<%
				mlist = (ArrayList<BirthdayForm>) request
						.getAttribute("birthdayList");
			if(!mlist.isEmpty()){
			%>
			<%
				for (BirthdayForm birthdayForm : mlist) {
					String BDayUser = birthdayForm.getUserName();
					String date = birthdayForm.getBirthDate();
			%>
			<div style="border: 1px solid #2BA7AD;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
			<span><img src="image/13.jpg" height="60px" width="60px" style="vertical-align: middle;"></span>
			<span style="font-weight: bold; font-size: 17px;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%=BDayUser%></span>
			<span style="font-weight: bold;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<%=date%></span>
			</div>
			<%
				}
			}
			%>
		</div>

	</div>
</body>
</html>